import { Pipe, PipeTransform } from '@angular/core';
import { getBillingTypesByValue } from '../model/type';

@Pipe({
  name: 'billingType'
})
export class BillingTypePipe implements PipeTransform {

  transform(name: string): string {
    const data = getBillingTypesByValue(name);
    return data ? data.name : '';
  }

}
